package nsoft.swing.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target( { ElementType.TYPE, ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
public @interface AComponent {
	String name() default "";

	String label() default "";

	String property() default "";

	Type type() default Type.LABEL;

	boolean editable() default false;

	String listProperty() default "";

	// TODO reference doc for properties to be provided.
	String[] properties() default {};

	String parent() default "";

	// TODO reference doc for properties to be provided.
	/**
	 * Properties are for laying out his component, can be prop:val or
	 * val,val.,...
	 *
	 * @return
	 */
	String[] layout() default {};

	/**
	 * Data format to be displayed(date format, number format etc.)
	 *
	 * @return
	 */
	String displayFormat() default "";

	/**
	 * For filtering input data. should be regular expression.
	 *
	 * @return
	 */
	String inputFormat() default "";
}
